<template>
	<view class="BJ03">
		<u-select v-model="show" mode="mutil-column" :list="list" @confirm="confirm">

		</u-select>
		<view class="w320" v-model="show">
			<view class="fs15" style="margin-top: 44rpx;text-align: center;">自动置休</view>
			<view class="w90">
				<view @click="frontn(0)">{{front}}</view>
				<text style="line-height: 62rpx;padding: 0 30rpx;">至</text>
				<view @click="frontn(1)">{{later}}</view>
			</view>
			<view style="margin-top: 80rpx;;height: 1px;opacity: 1;background: rgba(0,0,0,0.10);"></view>
			<view class="Liamgge" style="display: flex;">
				<view @tap="navgateBack" style="border-right: 1rpx solid #e1e1e6;">取消</view>
				<view @click="fanhui" style="color: rgba(87,107,149,1);">确定</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				front: '',
				flts: '',
				later: '',
				list: [
					[{
							value: '1',
							label: '00点'
						},
						{
							value: '2',
							label: '01点'
						},
						{
							value: '3',
							label: '02点'
						},
						{
							value: '4',
							label: '03点'
						},
						{
							value: '5',
							label: '04点'
						},
						{
							value: '6',
							label: '05点'
						},
						{
							value: '7',
							label: '06点'
						},
						{
							value: '8',
							label: '07点'
						},
						{
							value: '9',
							label: '08点'
						},
						{
							value: '10',
							label: '09点'
						}
					],
					[{
							value: '1',
							label: '00分'
						},
						{
							value: '2',
							label: '01分'
						},
						{
							value: '3',
							label: '02分'
						},
						{
							value: '4',
							label: '03分'
						},
						{
							value: '5',
							label: '04分'
						},
						{
							value: '6',
							label: '05分'
						},
						{
							value: '7',
							label: '06分'
						},
						{
							value: '8',
							label: '07分'
						}
					],

				],
			}
		},
		methods: {
			confirm(e) {
				// console.log(e)
				if (this.flts == 0) {
					this.front = e[0].label + e[1].label
				} else {
					this.later = e[0].label + e[1].label
				}
			},
			frontn(flt) {
				this.show = true
				this.flts = flt
			},
			fanhui(){
				uni.navigateBack({ //uni.navigateTo跳转的返回，默认1为返回上一级
						front: this.front,//休息前
						later: this.later,//休息后
					});
			},
			navgateBack(){
				uni.navigateBack()
			}
		}
	}
</script>

<style>
	.BJ03 {
		width: 100vw;
		height: 100vh;
		background: rgba(0, 0, 0, 0.4);
	}

	.w320 {
		width: 640rpx;
		height: 432rpx;
		background: #FFFFFF;
		position: absolute;
		top: 15%;
		left: 50%;
		transform: translateX(-50%);
		z-index: 999999999;
	}

	.w90 {
		width: 90%;
		margin-top: 82rpx !important;
		height: 62rpx;
		margin: auto;
		display: flex;
	}

	.w90>view {
		width: 252rpx;
		height: 62rpx;
		text-align: center;
		line-height: 62rpx;
		border: 1px solid #e1e1e6;
	}

	.Liamgge>view {
		width: 50%;
		height: 110rpx;
		font-size: 34rpx;
		text-align: center;
		line-height: 110rpx;
	}
</style>
